var { clickUtils, gUtils, logUtils, appUtils } = require("../../utils/index");
var { App } = require("../base/index");
var pointMap = require("./pointMap/index");

var daiShuDD = new App("袋鼠点点短视频", {
  maxCount: 30,
  interval: 10 * 60,
  autoClose: true,
});

daiShuDD.run = function (count) {
  gUtils.sleep(5, 10);
  logUtils.log("将点击 推荐");
  clickUtils.clickPointMap(pointMap.首页.推荐);
  this.watchVideo(count);
};
daiShuDD.watchVideo = function (count) {
  logUtils.log("第" + count + "次打开袋鼠点点");
  for (var index = 0; index < 5; index++) {
    logUtils.log("第" + (index + 1) + "次看视频");
    gUtils.sleep(30, 60);
    if (gUtils.possible(1, 10)) {
      appUtils.home(this.appName);
    }
  }
};
module.exports = daiShuDD;
